function ga_click(category)
{
	ga('send', 'event', category, 'click');

}
function gacode_events(category, target, url)
{
	if(typeof ga != 'undefined')
	{
		ga_click(category);
	}	
	
	if(target == 'self')
	{
		setTimeout( function(){ document.location = url; }, 500)	
	}
	else (target == 'top')
	{
		setTimeout( function(){ top.location = url; }, 500)		
	}
	
}

$(document).ready(function()
{
	$('.ga_click_top').click(function(e)
	{
		e.preventDefault();
		var title = $(this).attr('title');
		var url = $(this).attr('href');
		gacode_events(title,'top',url);	
	});

	$('.ga_click_self').click(function(e)
	{		
		e.preventDefault();		
		var title = $(this).attr('title');
		var url = $(this).attr('href');
		gacode_events(title, 'self',url);	
	});

	$('.ga_click_blank').click(function(e)
	{
		e.preventDefault();
		var title = $(this).attr('title');		
		gacode_events(title,'','');	
	
	});

});